<%--
FileFind - ftp/shares indexing and search php engine
Module: ffind-webapp-jsp
Description: Agent written in java language
Copyright (c) 2003-2010 Rage Steel, www.gt2.ru
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<sql:query var="hosts" dataSource="jdbc/ffind">
SELECT host_id AS hostId, host_name AS hostName,
INET_NTOA(host_ip) AS hostIP, host_type AS hostType, host_owner AS hostOwner
FROM ff_hosts
</sql:query>

  <head>
    <title>DB Test</title>
  </head>
  <body>

  <h2>Results</h2>

<c:forEach var="host" items="${hosts.rows}">
    Host id: ${host.hostId}, name: ${host.hostName}, ip: ${host.hostIP},
    owner: ${host.hostOwner}<br />
</c:forEach>

  </body>
</html>